package com.teziyou.commodity.enumtype;

public enum DictEnum {
	
	zhushouye("0201", "web主首页广告发布"),
	piaopin("0202", "web票品广告发布"),
	lvyou("0203", "web旅游广告发布"),
	appzhushouye("0210", "app主首页广告发布"),
	apppiaowu("0211", "app票务广告发布");
	
	private String code;
	private String desc;
	public String getCode() {
		return code;
	}
	public void setCode(String code) {
		this.code = code;
	}
	public String getDesc() {
		return desc;
	}
	public void setDesc(String desc) {
		this.desc = desc;
	}
	private DictEnum(String code, String desc) {
		this.code = code;
		this.desc = desc;
	}
	
	public static DictEnum getEnumByCode(String code) {
		DictEnum[] enums = DictEnum.values();
		for(DictEnum enumtype:enums) {
			if(code.equals(enumtype.getCode())) return enumtype;
		}
		return null;
	}

}
